#include "stdafx.h"

#include <opencv2/legacy/legacy.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/photo/photo.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/nonfree/features2d.hpp"
#include "opencv2/calib3d/calib3d.hpp"

#include "ResourceLibrary.h"
#include "RGBColour.h"

using namespace cv;
using namespace std;

ResourceLibrary::ResourceLibrary()
{
	//-- Image Variables
	originals;
	segmentedImages;
	warpedImages;

	//-- Image Information Variables
	homographies;
	warpedCorners;
}

ResourceLibrary::~ResourceLibrary(void)
{
}

void ResourceLibrary::addOriginals(Mat im)
{
	IplImage* storeImage=cvCloneImage(&(IplImage)im);
	originals.push_back(*storeImage);
}

void ResourceLibrary::addSegmentedImages(Mat im)
{
	IplImage* storeImage=cvCloneImage(&(IplImage)im);
	segmentedImages.push_back(*storeImage);
}

void ResourceLibrary::addWarpedImages(Mat im)
{
	IplImage* storeImage=cvCloneImage(&(IplImage)im);
	warpedImages.push_back(*storeImage);
}

void ResourceLibrary::addWarpedCorners(vector<Point2f> c)
{
	warpedCorners.push_back(c);
}

void ResourceLibrary::addPatches(Mat p)
{
	IplImage* storeImage=cvCloneImage(&(IplImage)p);
	patches.push_back(*storeImage);
}





 